#ifndef __LOG_H__
#define __LOG_H__
#include "stdafx.h"
#include <crtdbg.h>
#include <process.h>
#include "nfapi.h"

using namespace nfapi;

// Forward declarations
void printConnInfo(bool connected, ENDPOINT_ID id, PNF_TCP_CONN_INFO pConnInfo);
void printAddrInfo(bool created, ENDPOINT_ID id, PNF_UDP_CONN_INFO pConnInfo);

#ifdef _DEBUG
#define DbgPrint(format, ...)          \
    do                                 \
    {                                  \
        printf(format, ##__VA_ARGS__); \
        printf("\n");                  \
    } while (0);

#define DbgPrintConnInfo(flag, cid, cpConnInfo) \
    do                                          \
    {                                           \
        printConnInfo(flag, cid, cpConnInfo);   \
    } while (0);

#define DbgPrintAddrInfo(flag, cid, cpConnInfo) \
    do                                          \
    {                                           \
        printAddrInfo(flag, cid, cpConnInfo);   \
    } while (0);
#else
#define DbgPrint(format, ...)
#define DbgPrintConnInfo(flag, cid, cpConnInfo)
#define DbgPrintAddrInfo(flag, cid, cpConnInfo)
#endif // DEBUG

#endif // !__LOG_H__